Skip to content

Conversation

darrenmeehan
Copy link
Contributor

@darrenmeehan darrenmeehan commented Apr 28, 2020

Description of changes:

  • Fixed documentation in README.md to work with existing code.
  • Update awscli commands to work with version 2.
  • Ensure files built when following README.md are ignored from git
  • Remove Travis button as it's no longer used.
  • Resolves AWS CLI Instructions README Typo #84

Some code changes. I can revert this to make this PR cleaner if deemed more appropriate.

  • Fixed minor typos in docstring.
  • Minor linting.

By submitting this pull request

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

README.md Outdated

```bash
$ aws lambda invoke --function-name rustTest \
--cli-binary-format raw-in-base64-out \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth calling out you need the aws v2 cli for this to work. Some are using that but as it's relatively new, many are not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth calling out you need the aws v2 cli for this to work. Some are using that but as it's relatively new, many are not.

Great call. Should I add the invokcation command for both versions? Or highlight the need for --cli-binary-format with v2? I'm learning towards the latter as it's less verbose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've went with the following but happy to change! 56a745f

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let’s prefer version two of the CLI. I’d be surprised if the audience for this crate aren’t also early adopters of the newer CLI.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies it was late when I made the above commit 56a745f. It should say most users are using v1.

I think as it stands the README.md does a good job of documenting the command for both v1 & v2. Is there any change you would like here @davidbarsky ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yeah. No change then. Thanks for doing this!

[package]
name = "lambda"
version = "0.1.0"
authors = ["David Barsky <[email protected]>"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might drop the "client" part of this. That's an implementation detail most users won't likely care or care to know about. Just calling this "AWS Lambda Rust runtime" might get the point across and be a little bit more inline with https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

Copy link
Contributor Author

@darrenmeehan darrenmeehan Apr 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I've addressed this in f3337db

This is a closer fit to the convention for runtimes across different languages.
Most users are still using v2 of the cli.
Let's keep things simple for them.
Also expanded on comment

Co-Authored-By: David Barsky <[email protected]>
@darrenmeehan darrenmeehan changed the title Documentation Fixes with some linting Documentation fixes with some linting Apr 29, 2020
Comment on lines 9 to 11
//! be placed on an asynchronous main function. However, asynchronous main
//! functions are not legal valid Rust, which means that a crate like
//! [Runtime](https://github.com/rustasync/runtime) must be used. A main function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Sorry for the back and forth on this; I reviewed this before my coffee hit.)

Can we reword this to say something along the lines of "Tokio is required; we suggest using #[tokio::main]"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries at all. I'll get back to this in about an hour once I've food.

Fire away with any requests :)

Copy link
Contributor

@davidbarsky davidbarsky Apr 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I only noticed this docs issue now since I wrote that; the two big issues are:

  1. runtime is deprecated.
  2. This crate has a hard Tokio dependency (for now). Cross-runtime support is too hard and has too many open design questions, and until Rusoto supports runtimes other than Tokio, I don't think its worth attempting to support other runtimes in this crate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not totally familiar with tokio but I've attempted to clear this section up. Anything you would like changed? Sorry if I'm misunderstanding something!

Copy link
Contributor

@davidbarsky davidbarsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last comment; then I'll merge this in. Thanks!

@darrenmeehan
Copy link
Contributor Author

@davidbarsky Could this PR be linked with the following issue please? #84

@davidbarsky
Copy link
Contributor

Yup! If you’re to add a resolves [issue number] to the description of this PR, it’ll link and close that issue.

@darrenmeehan
Copy link
Contributor Author

Hi @davidbarsky is there anything you would like changed?

@davidbarsky
Copy link
Contributor

@darrenmeehan No, this looks great! Sorry for the delay and thanks for the fix!

@davidbarsky davidbarsky merged commit 8f026a0 into awslabs:master May 6, 2020
@darrenmeehan
Copy link
Contributor Author

Awesome thank you for the quick feedback. Looking forward to contributing some more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS CLI Instructions README Typo

3 participants